﻿using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement;

namespace Example_Addressables
{
	public class LoadAssetScript : MonoBehaviour
	{
		[SerializeField]
		private string _entryName;

		private void Start()
		{
			Addressables.Instantiate<GameObject>(_entryName).Completed += OnLoaded;
		}

		private void OnLoaded(IAsyncOperation<GameObject> obj)
		{
			GameObject instance = obj.Result;
		}
	}
}